<html xmlns="http://www.w3.org/1999/xhtml"><head><style type="text/css">
dt {
  font-style: italic;
  margin-top: 15px;
  margin-bottom: 3px;
  margin-left: 0px;
  border-bottom: 1px dotted black;
}
dd {
  margin-left: 10px;
}
table {
  border-collapse:collapse;
  border: 1px solid black;
  margin-top: 7px;
}
th {
  border: 1px solid black;
  padding: 3 7 3 7;
}
td {
  border: 1px solid black;
  padding: 3 7 3 7;
}
</style></head><body><p><a name="ifnull"></a><b>ifnull</b> :
  jump if null : <a href="opcodes.html">index</a> : <a href="http://asm.objectweb.org/asm40/javadoc/user/org/objectweb/asm/MethodVisitor.html#visitJumpInsn(int,%20org.objectweb.asm.Label)">visitJumpInsn()</a></p><dl><dt>Description</dt><dd>ifnull pops the top object reference off the operand stack. If
the object reference is to the special object null, execution branches
to the address (<i xmlns="">pc</i> + <i xmlns="">branchoffset</i>), where <i xmlns="">pc</i> is the
address of the ifnull opcode in the bytecode and <i xmlns="">branchoffset</i>
is a 16-bit signed integer parameter following the ifnull opcode in
the bytecode. If the object reference on the stack is not null,
execution continues at the next instruction.<br></br>If you are using Jasmin, <i xmlns="">branchoffset</i> is computed for you from the
address of &lt;label&gt;.</dd><dt>Example</dt><dd><pre>
    aload_1         ; push the object reference in local variable 1 onto the stack
    ifnull Label    ; if local variable 1 is null, jump to Label
    return          ; return if local variable 1 isn't null
Label:
    ; execution continues here if local variable 1 is null...
</pre></dd><dt>Notes</dt><dd>Addresses are measured in bytes from the start of the bytecode (i.e.
address 0 is the first byte in the bytecode of the currently executing
method).</dd><dt>See also</dt><dd><a href="ref-ifeq.html">ifeq</a> <a href="ref-.html"></a> <a href="ref-iflt.html">iflt</a> <a href="ref-.html"></a> <a href="ref-ifle.html">ifle</a> <a href="ref-.html"></a> <a href="ref-ifne.html">ifne</a> <a href="ref-.html"></a> <a href="ref-ifnonnull.html">ifnonnull</a> <a href="ref-.html"></a> <a href="ref-ifgt.html">ifgt</a> <a href="ref-.html"></a> <a href="ref-ifge.html">ifge</a> </dd><dt>Stack</dt><dd><table xmlns="">
<tr>
<td>
<b>Before </b>
</td>
<td><b>After</b></td></tr>
<tr>
<td>objectref</td>
<td>...</td></tr>
<tr>
<td>...</td>
<td>...</td></tr>
</table></dd><dt>Bytecode</dt><dd><table xmlns="">
<tr>
<td>
<b> Type </b>
</td>
<td><b>Description</b></td></tr>
<tr>
<td>
u1 
</td>
<td>ifnull
opcode = 0xC6 (198)
</td></tr>
<tr>
<td>
s2 
</td>
<td>branch-offset</td></tr>
</table></dd></dl></body></html>